import { Exclude } from 'class-transformer';
import { Entity, Column, PrimaryColumn, CreateDateColumn, UpdateDateColumn } from 'typeorm';
@Entity()
export class User {
  @PrimaryColumn({type:"bigint",default:1})
  id: number;

  @Column()
  userName: string;
  
  @Exclude()
  @Column()
  password: string;

  @Exclude()
  @Column({ default: true })
  isActive: boolean;
  
  @Exclude()
  @CreateDateColumn() 
  create_time:"timestamptz"
  
  @Exclude()
  @UpdateDateColumn()
  update_time:"timestamptz"

  constructor(partial: Partial<User>) {
    Object.assign(this, partial);
  }
}
